﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResearchActivity.aspx.cs" Inherits="School.SystemManage.WebPages.Research.ResearchActivity" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../css/right.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #updatemodule{width:100%;}
        #insertmodule{ width:100%;}
        .nodata{ color:Red; text-align:center;}
        .atd1{width:70%;}
        .atd2{width:10%;}
        .atd3{width:10%;}
        .atd4{width:10%;}
        .txtInput{ width:99%; height:80px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <div class="title_bg">
            <div class="floatLeft title_text_div">学术科研 > 科研动态</div>
            <ul class="floatRight">
                
            </ul>
        </div>
        <div class="floatLeft" id="updatemodule">
            <asp:ListView ID="lv" runat="server" DataKeyNames="ArticleID" 
                ItemPlaceholderID="PlaceHolder1" onitemcanceling="lv_ItemCanceling" 
                onitemdeleting="lv_ItemDeleting" onitemediting="lv_ItemEditing" 
                onitemupdating="lv_ItemUpdating">
                <LayoutTemplate>
                    <table class="dataTable" cellspacing="0">
                        <tr>
                            <th class="atd1">内容</th>
                            <th class="atd2">日期</th>
                            <th class="atd3">作者</th>
                            <th class="atd4">操作</th>
                        </tr>
                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("Content")%></td>
                        <td><%#Eval("UpdateTime")%></td>
                        <td></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">编辑</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete">删除</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <EditItemTemplate>
                    <tr>
                        <td><asp:TextBox ID="txbContent" runat="server" Text='<%#Eval("Content")%>' TextMode="MultiLine" CssClass="txtInput"></asp:TextBox></td>
                        <td><%#Eval("UpdateTime")%></td>
                        <td></td>
                        <td><asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">更新</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                        </td>
                    </tr>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <span class="nodata">没有数据</span>
                </EmptyDataTemplate>
            </asp:ListView>
            <webdiyer:AspNetPager runat="server" ID="AspNetPager1" PageSize="10"                
                CustomInfoHTML="每页%PageSize%条，%CurrentPageIndex%/%PageCount%页" 
                FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 
                ShowCustomInfoSection="Left" SubmitButtonText="Go" TextAfterPageIndexBox="页"  
                CustomInfoClass="customInfo" CustomInfoSectionWidth="120"
                TextBeforePageIndexBox="转到" onpagechanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </div>
        <div class="floatRight" id="insertmodule" runat="server">
            <table class="dataTable" cellspacing="0">
                <tr>
                    <th colspan="2">添加动态</th>
                </tr>
                <tr>
                    <td>内容：</td>
                    <td><asp:TextBox ID="txbCon" runat="server" TextMode="MultiLine" CssClass="txtInput"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="2"><asp:Button ID="btnSubmit" runat="server" Text="提交" 
                            onclick="btnSubmit_Click" /><asp:Label ID="lblMsg" runat="server" Text="" CssClass="red"></asp:Label></td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
